<template>
  <view class="container">
    <rich-text :nodes="text"></rich-text>
  </view>
</template>

<script>
import User from '../../api/user'
import base64 from '../../util/base64'

const userModel = new User()
export default {
  data() {
    return {
      text: ''
    }
  },
  onLoad() {
    this.getSet()
  },
  methods: {
    getSet() {
      userModel.getAgreementAll().then(response => {
        let { data } = response
        data = base64.parse(data)
        this.text = data.agreement_privacy
        // console.log(data)
      })
    }
  }
}
</script>

<style scoped lang="scss">
.container {
  font-size: 28rpx;
  color: #666;
  letter-spacing: 5rpx;
  line-height: 1.5em;
  padding: 0 20rpx;
  text-align: left;
}
</style>
